package kr.hkit.PowerJava.chapter20;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class ArraysEx {
	public static void main(String[] args) {
		ArrayList<Integer> arList = new ArrayList<>();
		for (int i = 1; i < 11; i++) {
			arList.add(i);
		}

		for (int a : arList) {
			System.out.printf("%-3d ", a);
		}
		System.out.println();
		for (int a : arList) {
			System.out.printf("%3d ", a);

		}
        int[] arr = new int[10];
        for(int i = 0; i<10; i++){
        	arr[i] = i+1;
	   	}
        System.out.println();
	List<Integer>list = Arrays.asList(1,2,3,4,5,6,7);
        for(int i =0;i<list.size(); i++){
        	System.out.print(list.get(i));
        }
        System.out.println();
	  //arr
        for(int a:arr){
        	System.out.printf("%3d", a);
        	
        }
	   System.out.println();
        int idx = Arrays.binarySearch(arr, 11);
	   System.out.println("11의 위치는 ? "+idx);
	   
	   boolean[] lotto = new boolean[45];
	   Arrays.fill(lotto, true);
	   for (boolean b: lotto){
		   System.out.print(b+" ");
	   }
	
	}
}